package com.yangguang.huahui.mvp.presenter;

import com.yangguang.huahui.entity.AttentionList;
import com.yangguang.huahui.mvp.model.CommonModel;
import com.yangguang.huahui.mvp.view.AttentionView;
import com.yangguang.huahui.rx.RxManager;
import com.yangguang.huahui.rx.RxSubscriber;

/**
 * Created by Administrator on 2017/3/2.
 */

public class AttentionPresenter extends BasePresenter<AttentionView>{
    CommonModel commonModel;

    public AttentionPresenter() {
        commonModel = new CommonModel();
    }
    public void getListData(String id){
        mSubscription = RxManager.getInstance().doSubscribe(commonModel.getListData(id), new RxSubscriber<AttentionList>(true) {
            @Override
            protected void _onNext(AttentionList data) {
                mView.onSuccess(data);
            }

            @Override
            protected void _onError() {
                mView.onError();
            }
        });
    }
}
